{include file='index/header'/}

<div style="padding:20px; ">
    <div style="background: #FFFFFF;padding: 20px 50px;">
        <div style="margin: 10px 0px;">
        <span class="layui-breadcrumb">
  <a href="">首页</a>
  <a href="">预约进度</a>
  <a><cite>课室历史预约</cite></a>
</span>
        </div>
        <table class="layui-table">
            <thead>
            <tr>
                <th>ID</th>
                <th>课室名称</th>
                <th>所在地址</th>
                <th>管理教师</th>
                <th>预约时间</th>
                <th>预约进度</th>
            </thead>
            <tbody>
            {volist name="lab_apps" id="lab" empty="暂无历史预约记录"}
            <tr>
                <td>{$lab.id}</td>
                <td>{$lab->lab->name|default="暂无实验室信息"}</td>
                <td>{$lab->lab->address|default="暂无实验室地址信息"}</td>
                <td>
                    {$lab->lab->teacher->realname|default="暂无教师信息"}
                </td>
                <td>
                    {$lab.date}&nbsp;&nbsp;{$lab.time}
                </td>
                <td>
                    {switch $lab.statu}
                    {case 0} <p></p>未审批 {/case}
                    {case 1} <p style="color: #5FB878;">通过</p> {/case}
                    {case 2} <p style="color: darkred">退回</p> {/case}
                    {/switch}
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="page">
            {$lab_apps|raw}
        </div>

    </div>
    {include file='index/footer'/}
    <script>
        $('#lab_yuyue').addClass("layui-nav-itemed");
        $('#old_yuyue').addClass("layui-nav-itemed");
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#test2' //指定元素
            });
        });
        layui.use('form', function(){
            var form = layui.form;
            //监听提交
            form.on('submit(formDemo)', function(data){
                layer.msg(JSON.stringify(data.field));
                return false;
            });
        });
    </script>

